# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :fields.py
# @Time      :2022/7/1 15:17
# @Author    :吕华龙
from flask_restful import fields

channel_fields = {
    "cid": fields.Integer,
    "name": fields.String,
    "score": fields.Integer,
}

# 定义新闻的序列化器
news_fields = {
    "nid": fields.Integer,
    "title": fields.String,
    "content": fields.String,
    "img": fields.String,
    "comment_count": fields.Integer,
    "digg_count": fields.Integer,
    "read_count": fields.Integer,
    "create_time": fields.String,
}

# 定义用户的序列化器
user_fields = {
    "uid": fields.Integer,
    "mobile": fields.String,
    "user_name": fields.String,
    "img": fields.String,
    "intro": fields.String,
    "article_count": fields.Integer,
    "following_count": fields.Integer,
    "fans_count": fields.Integer,
    "like_count": fields.Integer,
    "read_count": fields.Integer,
}

# 定义评论的序列化器
comment_fields = {
    "cmid": fields.Integer,
    "digg_count": fields.Integer,
    "reply_count": fields.Integer,
    "content": fields.String,
    "is_top": fields.Integer,
    "create_time": fields.String,
}
